/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cashmate.struts;

import com.opensymphony.xwork2.ActionSupport;

import org.apache.struts2.ServletActionContext;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;

/**
 *
 * @author Dine
 */
public class Sample extends ActionSupport {
    private String loc;
    private String actstatus;
    
    public String getLoc() {
        return loc;
    }

    public String getActstatus() {
        return actstatus;
    }

    public void setActstatus(String actstatus) {
        this.actstatus = actstatus;
    }

    @Action(value = "/sample", results = {
        @Result(name = "input", location = "${loc}"),
        @Result(name = "success",location = "${loc}")
    })


    @Override
    public String execute(){
        try {
            loc="../../loancollection.jsp?cat=coll";
            actstatus="ok";
            
            
            ServletActionContext.getRequest().setAttribute("savedeposit", actstatus);
            return SUCCESS;

        } catch (Exception e) {
            System.out.println("collerror3"+e.toString());
        }
        return SUCCESS;
    }
}
